Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: make test-crypto-hash compatible with OpenSSL > 3.4.0 #56160

Closed
wants to merge 2 commits into from

Conversation

jelly
Copy link
Contributor

@jelly jelly commented Dec 6, 2024

OpenSSL 3.4 has a breaking change where the outputLength is now mandatory for shake* hash algorithms.

openssl/openssl@b911fef


This only fixes one of the tree issues with OpenSSL 3.4. and it doesn't fix crypto.createHash() which likely should be adjusted to be compatible with the new OpenSSL behaviour but I am unsure how that is done. I assume it should raise an InvalidArgumentError now.

Refs: #56159

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Dec 6, 2024
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. lts-watch-v18.x PRs that may need to be released in v18.x. lts-watch-v20.x PRs that may need to be released in v20.x labels Dec 6, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 6, 2024
@nodejs-github-bot

This comment was marked as outdated.

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.17%. Comparing base (0576deb) to head (dcaecf0).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56160      +/-   ##
==========================================
- Coverage   89.18%   89.17%   -0.01%     
==========================================
  Files         662      662              
  Lines      191751   191759       +8     
  Branches    36909    36908       -1     
==========================================
- Hits       171008   171001       -7     
- Misses      13604    13613       +9     
- Partials     7139     7145       +6     

see 25 files with indirect coverage changes

Comment on lines 1062 to 1064
get hasOpenSSL34() {
return hasOpenSSL(3, 4);
},
Copy link
Member

@richardlau richardlau Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I added hasOpenSSL() in #53456, the idea was to stop adding new functions for every OpenSSL version to common, and instead directly call, e.g.hasOpenSSL(3, 4) in the test.

@aduh95
Copy link
Contributor

aduh95 commented Dec 10, 2024

Can you please rebase to fix the conflict and address Richard's review? Let me know if you'd prefer me to do it instead

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 17, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 17, 2024
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as duplicate.

@jelly
Copy link
Contributor Author

jelly commented Jan 2, 2025

Can you please rebase to fix the conflict and address Richard's review? Let me know if you'd prefer me to do it instead

Now that the holidays are over, done :)

OpenSSL 3.4 has a breaking change where the outputLength is now
mandatory for shake* hash algorithms.

openssl/openssl@b911fef
@nodejs-github-bot

This comment was marked as outdated.

The shake128/shake256 hashing algorithms broke due to an OpenSSL 3.4
incompatible change and now throws an Error.
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 12, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 12, 2025
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@richardlau richardlau added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. labels Jan 13, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 13, 2025
@nodejs-github-bot
Copy link
Collaborator

Landed in 496e17e...e6a988d

nodejs-github-bot pushed a commit that referenced this pull request Jan 13, 2025
OpenSSL 3.4 has a breaking change where the outputLength is now
mandatory for shake* hash algorithms.

openssl/openssl@b911fef
PR-URL: #56160
Refs: #56159
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Jan 13, 2025
The shake128/shake256 hashing algorithms broke due to an OpenSSL 3.4
incompatible change and now throws an Error.

PR-URL: #56160
Refs: #56159
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
@jelly jelly deleted the openssl-3.4.0 branch January 13, 2025 18:47
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Jan 13, 2025
OpenSSL 3.4 has a breaking change where the outputLength is now
mandatory for shake* hash algorithms.

openssl/openssl@b911fef
PR-URL: nodejs#56160
Refs: nodejs#56159
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Jan 13, 2025
The shake128/shake256 hashing algorithms broke due to an OpenSSL 3.4
incompatible change and now throws an Error.

PR-URL: nodejs#56160
Refs: nodejs#56159
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. lts-watch-v18.x PRs that may need to be released in v18.x. lts-watch-v20.x PRs that may need to be released in v20.x needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants